package com.swg.wxorder.utils;


import com.swg.wxorder.vo.ResultVo;

import java.util.List;

/**
 * @Author 【swg】.
 * @Date 2017/12/8 10:41
 * @DESC
 * @CONTACT 317758022@qq.com
 */
public class ResultVOUtil {
    public static ResultVo success(Object object){
        ResultVo resultVO = new ResultVo();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(object);
        return resultVO;
    }

    public static ResultVo success(){
        ResultVo resultVO = new ResultVo();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }

    public static ResultVo error(Integer code,String msg){
        ResultVo resultVO = new ResultVo();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
